<template>
  <div class="NavContainer">
    <header>
      <div class="container">
        <div class="logo">
          <img src="https://rs.dance365.com/logo@3xrenew3.png" alt="中舞网">
        </div>
        <nav class="nav">
          <router-link :class="$router.currentRoute.value.path === '/index/recommend' ? 'avatar' : '' " to="/index/recommend" >资源</router-link>
          <router-link :class="$router.currentRoute.value.path === '/discovery/vip_zone' ? 'avatar' : ''" to="/discovery/vip_zone">课程</router-link>
          <router-link :class="$router.currentRoute.value.path === '/training' ? 'avatar' : '' " to="/training">练习室</router-link>
          <router-link :class="$router.currentRoute.value.path === '/communication/systemNote' ? 'avatar' : '' " to="/communication/systemNote">交流</router-link>
          <router-link :class="$router.currentRoute.value.path === '/center/dynamics' ? 'avatar' : '' " to="/center/dynamics">我的</router-link>
        </nav>
<!--  子组件抽离      -->
        <UserLogin></UserLogin>
        </div>
        </header>
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";
export default defineComponent({
  name:"Nav",
})
</script>

<script setup lang="ts">
import UserLogin from "@/components/NavigationBar/userLogin.vue";
</script>

<style lang="scss" scoped>
.NavContainer{
  width: 100%;
  background-color: #fff;
  box-shadow: 8px 0 10px #3c3f41;
}
.container {
  width: 1200px;
  margin: 0px auto;
  display: flex;
  background-color: #fff;
}

header {
  height: 62px;
}

/* logo */
.logo {
  width: 128px;
  line-height: 60px;
  margin-right: 30px;
}

.logo img {
  height: 30px;
  vertical-align: middle;
}

/* nav */
.nav {
  width: 458px;
  display: flex;
  justify-content: space-between;
  line-height: 60px;
}

.nav a {
  font-size: 18px;
  text-decoration: none;
  color: #101010;
}

.nav a:hover {
  color: #f93684;
}

/* header-right */
.header-right {
  flex: 1;
  text-align: right;
  line-height: 60px;
  align-items: center;
}

.header-right button {
  width: 75px;
  height: 30px;
  padding: 0;
  /*background-color: #f93684;*/
  color: #fff;
  border: 1px solid #dcdfe6;
  font-size: 16px;
  text-align: center;
  line-height: 29px;
}
a.avatar {
  color: red;
}
</style>
